/*
 *  This class is part of WorkTimeCalculator Android App
 *  Author: Domenico Pio Novelli
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.dpndeveloper.wtc.listener;

import com.dpndeveloper.wtc.dataprovider.WtcInterval;
import com.dpndeveloper.wtc.dialogs.IntervalDialog;

/**
 * Instances of this class are sent as a result of interval set by an Interval
 * Dialog.
 * 
 * @author Domenico Pio Novelli
 * 
 */
public class OnIntervalSetEvent {

	private IntervalDialog	m_source;
	private WtcInterval		m_interval;

	/**
	 * Constructor
	 * 
	 * @param source
	 *            the Interval Dialog that generate the event
	 * @param interval
	 *            the interval set
	 */
	public OnIntervalSetEvent(IntervalDialog source, WtcInterval interval) {
		super();
		this.m_source = source;
		this.m_interval = interval;
	}

	/**
	 * Return the Interval Dialog that generate the event
	 * 
	 * @return the source Interval Dialog
	 */
	public IntervalDialog getSource() {
		return m_source;
	}

	/**
	 * Return the modified interval
	 * 
	 * @return the interval
	 */
	public WtcInterval getInterval() {
		return m_interval;
	}
}
